import request from '@/utils/request'

// 查询收藏列表
export function getCollect() {
  return request({
    url: '/system/collection/list',
    method: 'get'
  })
}

// 添加收藏
export function collect(data) {
  return request({
    url: '/system/collection',
    method: 'post',
    data
  })
}

// 删除收藏
export function delCollect(data) {
  return request({
    url: `/system/collection/cancel/${data}`,
    method: 'delete'
  })
}

export default {
  getCollect,
  collect,
  delCollect
}
